import Vue from 'vue';
import VueRouter from 'vue-router';
import HomeView from '../views/HomeView.vue';

Vue.use(VueRouter);

const router = new VueRouter({
  mode: 'hash',
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('../views/login/index.vue'),
    },
    {
      path: '/capital',
      name: 'Capital',
      component: () => import('../views/capital.vue'),
    },
    {
      path: '/visual',
      name: 'Visual',
      component: () => import('../views/Visual.vue'),
      children:[
        {
          path:"personnel",
          component:()=> import('../views/visual/components/personnel.vue'),
          name:"Personnel",
        },
        {
          path:"energy",
          component:()=> import('../views/visual/components/energy.vue'),
          name:"Energy",
        },
        {
          path:"/visual/property",
          component:()=> import('../views/visual/components/property.vue'),
          name:"property",
          meta: { hideLayout: true }  // 新窗口专用
        },
      ],
    },
  ]
});

export default router;
